**********************************************************************************  
* Replication file: Transparency and support for aid - observational data
*
* Contact: bernhard.reinsberg@glasgow.ac.uk
**********************************************************************************


* Data

  use "DOTRAN_countries", clear 

  g lngni=ln(gni)
  
  
* Figure 

  g defpos=3
  replace defpos=10 if iso3=="GBR"
  replace defpos=5 if iso3=="AUT"
  replace defpos=12 if iso3=="IRL"
  replace defpos=1 if iso3=="HUN"
  replace defpos=5 if iso3=="FRA"
  
  twoway (scatter qc3_more t, mlab(iso3) mlabvposition(defpos)) (lfit qc3_more t), scheme(s1mono) legend(off) xtitle(CATD index) ytitle(Increase foreign aid) 

  
* Tables   

  g y1=100*qc3_more
  g y2=100*(qc3_more+qc3_same)
  
  qui reg y1 t member, ro
  est store a11
  qui reg y1 t member lngni, ro
  est store a12
  qui reg y1 t member lngni wdi_tax, ro
  est store a13
  
  ** Table 5 **
  estout a1*, drop(_* ) starlevels(* .1 ** .05 *** .01) cells((b(star fmt(3)) se(par fmt(3)))) stats(N r2, fmt(0 3)) 

  
  qui reg y2 t member, ro
  est store a21
  qui reg y2 t member lngni, ro
  est store a22
  qui reg y2 t member lngni wdi_tax, ro
  est store a23
  
  ** Table A5 **
  estout a2*, drop(_* ) starlevels(* .1 ** .05 *** .01) cells((b(star fmt(3)) se(par fmt(3)))) stats(N r2, fmt(0 3)) 


  qui reg y1 t1 member, ro
  est store a31
  qui reg y1 t1 member lngni, ro
  est store a32
  qui reg y1 t1 member lngni wdi_tax, ro
  est store a33
  
  ** Table A6 **
  estout a3*, drop(_* ) starlevels(* .1 ** .05 *** .01) cells((b(star fmt(3)) se(par fmt(3)))) stats(N r2, fmt(0 3)) 

  
  qui reg y1 t2 member, ro
  est store a41
  qui reg y1 t2 member lngni, ro
  est store a42
  qui reg y1 t2 member lngni wdi_tax, ro
  est store a43
  
  ** Table A7 **
  estout a4*, drop(_* ) starlevels(* .1 ** .05 *** .01) cells((b(star fmt(3)) se(par fmt(3)))) stats(N r2, fmt(0 3)) 

  
    